<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
	<script type="text/javascript" src="30days.js"></script>
	<title>day 11 - modifying effect speeds</title>
	
	<style>
		/* remove this and see the difference in the effects */
		p { margin-top: 0px;}
	</style>
	
</head>




<body>

	<h1>day 12 - Creating custom effects methods</h1>
	
	<h1>click</h1>
	<div class=content>
		<p>
		Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
		tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
		quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
		consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
		cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
		</p>
		<p>
		Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
		tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
		quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
		consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
		cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
		</p>	
	</div>
	
	
	<script type="text/javascript">
	
		// self invoking function 
		(function () {
			
			// hide content and assign the element to the var
			var content = $('div.content').hide();
		
			// function from jquery source and customized with our animation
			jQuery.fn.flash = function (speed,easing,callback) {
				
					// store a reference
					var $this = $(this);
					$this.slideDown(1000, function() {
						console.log('animation finished');
						$this.delay(2000).slideUp(500);
					});
				console.log('the animation is ended?');
			};
		
		$('h1').on('click', function() {
			// call our animated personalized function
			content.flash();
		});
		
	})();

	</script>
	
</body>





</html>